package com.zth.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zth.pojo.Config;
import com.zth.service.ConfigService;

@RequestMapping("/config")
@RestController
public class ConfigController {
	@Autowired
	private ConfigService configService;
	
	@RequestMapping("/findAll")
	public List<Config> findAll(){
		
		return configService.findAll();
	}
	
	@RequestMapping("/editFooter")
	public Map<String, Object> editFooter(Config config){
		int row=configService.editFooter(config);
		Map<String, Object> map=new HashMap<String, Object>();
		map.put("row", row);
		map.put("message", "编辑");
		return map;
	}
	
}
